<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">用户综合信息</h3>
    </div>
    <div class="panel-body">
        <!-- 用户基本信息 -->
        <div class="user-basic-info">
            <h4>基本信息</h4>
            <div class="row">
                <div class="col-md-10">
                    <dl class="dl-horizontal">
                        <dt>姓名：</dt><dd>{$userInfo.name}</dd>
                        <dt>性别：</dt><dd>{$userInfo.gender}</dd>
                        <dt>关系：</dt><dd>{$userInfo.relation}</dd>
                        <dt>年龄：</dt><dd>{$userInfo.age}</dd>
                        <dt>身高：</dt><dd>{$userInfo.height}cm</dd>
                        <dt>体重：</dt><dd>{$userInfo.weight}kg</dd>
                        <dt>血型：</dt><dd>{$userInfo.blood_types}型</dd>
                        <dt>注册时间：</dt><dd>{$userInfo.createtime|datetime}</dd>
                    </dl>
                </div>
            </div>
        </div>

        <hr>

        <!-- Tab导航 -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a href="#medical" aria-controls="medical" role="tab" data-toggle="tab">就诊资料</a></li>
            <li role="presentation"><a href="#medication" aria-controls="medication" role="tab" data-toggle="tab">用药计划</a></li>
            <li role="presentation"><a href="#health" aria-controls="health" role="tab" data-toggle="tab">健康史</a></li>
        </ul>

        <!-- Tab内容 -->
        <div class="tab-content">
            <!-- 就诊资料 -->
            <div role="tabpanel" class="tab-pane active" id="medical">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <table class="table table-bordered table-hover table-striped">
                            <thead>
                                <tr>
                                    <th>就诊日期</th>
                                    <th>医院</th>
                                    <th>备注</th>
                                    <th>类型</th>
                                    <th>材料</th>
                                </tr>
                            </thead>
                            <tbody>
                                {volist name="medicalRecords" id="vo"}
                                <tr>
                                    <td>{$vo.date|datetime}</td>
                                    <td>{$vo.hospital_name}</td>
                                    <td>{$vo.title}</td>
                                    <td>{$vo.type_name}</td>
                                    <td>
                                        {if !empty($vo.images)}
                                        <div class="medical-images">
                                            {volist name="vo.images" id="image" key="k"}
                                            <a href="{$image}" data-lightbox="medical-{$vo.id}" data-title="就诊资料 {$k}">
                                                <img src="{$image}" class="img-thumbnail" style="width:60px;height:60px;margin-right:5px;">
                                            </a>
                                            {/volist}
                                        </div>
                                        {else/}
                                        无资料
                                        {/if}
                                    </td>
                                </tr>
                                {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <!-- 用药计划 -->
            <div role="tabpanel" class="tab-pane" id="medication">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <table class="table table-bordered table-hover table-striped">
                            <thead>
                                <tr>
                                    <th>药品名称</th>
                                    <th>剂量</th>
                                    <th>用法</th>
                                    <th>指导建议</th>
                                    <th>服用频次</th>
                                    <th>开始日期</th>
                                    <th>结束日期</th>
                                </tr>
                            </thead>
                            <tbody>
                                {volist name="medicationPlans" id="vo"}
                                <tr>
                                    <td>{$vo.medication_name}</td>
                                    <td>{$vo.metering}{$vo.metering_unit}</td>
                                    <td>{$vo.method}</td>
                                    <td>{$vo.guidance_name}</td>
                                    <td>{$vo.frequency}</td>
                                    <td>{$vo.start_date}</td>
                                    <td>{$vo.end_time}</td>
                                </tr>
                                {/volist}
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <!-- 健康史 -->
            <div role="tabpanel" class="tab-pane" id="health">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-md-6">
                                <div class="panel panel-info">
                                    <div class="panel-heading">
                                        <h3 class="panel-title">家族史</h3>
                                    </div>
                                    <div class="panel-body">
                                        {volist name="healthHistoryjiazu" id="vo" empty="暂时没有家族记录"}
                                            <div>{$vo.relation}-{$vo.name}-{$vo.age}</div>
                                        {/volist}
                                    </div>
                                </div>
                            </div>
                            <!-- 个人史 -->
                            <div class="col-md-6">
                                <div class="panel panel-info">
                                    <div class="panel-heading">
                                        <h3 class="panel-title">个人史</h3>
                                    </div>
                                    <div class="panel-body">
                                        {volist name="healthHistorygeren" id="vo" empty="暂时没有个人记录"}
                                            <div>{$vo}</div>
                                        {/volist}
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- 既往史 - 分为四个子项 -->
                        <div class="panel panel-primary">
                            <div class="panel-heading">
                                <h3 class="panel-title">既往史</h3>
                            </div>
                            <div class="panel-body">
                                <!-- 疾病史 -->
                                <div class="panel panel-default">
                                    <div class="panel-body">
                                        {if empty($healthHistoryjiwangcustomDiseases)}
                                            <div class="alert alert-info">暂无疾病史记录</div>
                                        {else/}
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                    <tr>
                                                        <th>疾病名称</th>
                                                        <th>确诊时间</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {volist name="healthHistoryjiwangcustomDiseases" id="vo"}
                                                    <tr>
                                                        <td>{$vo.name}</td>
                                                        <td>{$vo.diagnoseTime}</td>
                                                    </tr>
                                                    {/volist}
                                                </tbody>
                                            </table>
                                        {/if}
                                    </div>
                                </div>

                                <!-- 手术史 -->
                                <div class="panel panel-default">
                                    <div class="panel-body">
                                        {if empty($healthHistoryjiwangsurgery)}
                                            <div class="alert alert-info">暂无手术史记录</div>
                                        {else/}
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                    <tr>
                                                        <th>手术名称</th>
                                                        <th>手术时间</th>
                                                        <th>医院</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {volist name="healthHistoryjiwangsurgery" id="vo"}
                                                    <tr>
                                                        <td>{$vo.name}</td>
                                                        <td>{$vo.date}</td>
                                                        <td>{$vo.hospital}</td>
                                                    </tr>
                                                    {/volist}
                                                </tbody>
                                            </table>
                                        {/if}
                                    </div>
                                </div>

                                <!-- 过敏史 -->
                                <div class="panel panel-default">
                                    <div class="panel-body">
                                        {if empty($healthHistoryjiwangallergy)}
                                            <div class="alert alert-info">暂无过敏史记录</div>
                                        {else/}
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                    <tr>
                                                        <th>过敏源</th>
                                                        <th>过敏反应</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {volist name="healthHistoryjiwangallergy" id="vo"}
                                                    <tr>
                                                        <td>{$vo.name}</td>
                                                        <td>{$vo.symptom}</td>
                                                    </tr>
                                                    {/volist}
                                                </tbody>
                                            </table>
                                        {/if}
                                    </div>
                                </div>

                                <!-- 用药史 -->
                                <div class="panel panel-default">
                                    <div class="panel-body">
                                        {if empty($healthHistoryjiwangmedication)}
                                            <div class="alert alert-info">暂无用药史记录</div>
                                        {else/}
                                            <table class="table table-bordered table-hover">
                                                <thead>
                                                    <tr>
                                                        <th>药品名称</th>
                                                        <th>用药时间</th>
                                                        <th>用药频次</th>
                                                        <th>用药剂量</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    {volist name="healthHistoryjiwangmedication" id="vo"}
                                                    <tr>
                                                        <td>{$vo.name}</td>
                                                        <td>{$vo.startDate}~{$vo.endDate}</td>
                                                        <td>{$vo.frequency}</td>
                                                        <td>{$vo.dosage.value}{$vo.dosage.unit}</td>
                                                    </tr>
                                                    {/volist}
                                                </tbody>
                                            </table>
                                        {/if}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
